/*
 * @Author: xuetao 3168581151@qq.com
 * @Date: 2025-02-11
 * @LastEditors: xuetao 3168581151@qq.com
 * @LastEditTime: 2025-02-25
 * @Description: 
 */
import 'package:flutter/material.dart';

void showImagePreview(BuildContext context, imageUrl) {
  showDialog(
    context: context,
    builder: (context) {
      return Dialog(
        child: Container(
          padding: const EdgeInsets.all(16.0),
          child: imageUrl == null || imageUrl!.isEmpty
              ? Icon(
                  Icons.running_with_errors_sharp,
                  color: Colors.black,
                )
              : Image.network(
                  imageUrl!,
                  fit: BoxFit.contain,
                ),
        ),
      );
    },
  );
}
